home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Ghostscript / src / gzstate.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-01  |  4.4 KB  |  137 lines

  1. /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of AFPL Ghostscript.
  4.   
  5.   AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author or
  6.   distributor accepts any responsibility for the consequences of using it, or
  7.   for whether it serves any particular purpose or works at all, unless he or
  8.   she says so in writing.  Refer to the Aladdin Free Public License (the
  9.   "License") for full details.
  10.   
  11.   Every copy of AFPL Ghostscript must include a copy of the License, normally
  12.   in a plain ASCII text file named PUBLIC.  The License grants you the right
  13.   to copy, modify and redistribute AFPL Ghostscript, but only under certain
  14.   conditions described in the License.  Among other things, the License
  15.   requires that the copyright notice and this notice be preserved on all
  16.   copies.
  17. */
  18.  
  19. /*$Id: gzstate.h,v 1.3 2000/09/19 19:00:41 lpd Exp $ */
  20. /* Private graphics state definition for Ghostscript library */
  21.  
  22. #ifndef gzstate_INCLUDED
  23. #  define gzstate_INCLUDED
  24.  
  25. #include "gscpm.h"
  26. #include "gscspace.h"
  27. #include "gsrefct.h"
  28. #include "gxdcolor.h"
  29. #include "gxistate.h"
  30. #include "gsstate.h"
  31. #include "gxstate.h"
  32.  
  33. /* Opaque types referenced by the graphics state. */
  34. #ifndef gx_path_DEFINED
  35. #  define gx_path_DEFINED
  36. typedef struct gx_path_s gx_path;
  37. #endif
  38. #ifndef gx_clip_path_DEFINED
  39. #  define gx_clip_path_DEFINED
  40. typedef struct gx_clip_path_s gx_clip_path;
  41. #endif
  42. #ifndef gx_clip_stack_DEFINED
  43. #  define gx_clip_stack_DEFINED
  44. typedef struct gx_clip_stack_s gx_clip_stack_t;
  45. #endif
  46. #ifndef gs_color_space_DEFINED
  47. #  define gs_color_space_DEFINED
  48. typedef struct gs_color_space_s gs_color_space;
  49. #endif
  50. #ifndef gs_client_color_DEFINED
  51. #  define gs_client_color_DEFINED
  52. typedef struct gs_client_color_s gs_client_color;
  53. #endif
  54. #ifndef gs_font_DEFINED
  55. #  define gs_font_DEFINED
  56. typedef struct gs_font_s gs_font;
  57. #endif
  58. #ifndef gs_transparency_group_DEFINED
  59. #  define gs_transparency_group_DEFINED
  60. typedef struct gs_transparency_group_s gs_transparency_group_t;
  61. #endif
  62.  
  63. /* Graphics state structure. */
  64.  
  65. struct gs_state_s {
  66.     gs_imager_state_common;    /* imager state, must be first */
  67.     gs_state *saved;        /* previous state from gsave */
  68.  
  69.     /* Transformation: */
  70.  
  71.     gs_matrix ctm_inverse;
  72.     bool ctm_inverse_valid;    /* true if ctm_inverse = ctm^-1 */
  73.     gs_matrix ctm_default;
  74.     bool ctm_default_set;    /* if true, use ctm_default; */
  75.                 /* if false, ask device */
  76.  
  77.     /* Paths: */
  78.  
  79.     gx_path *path;
  80.     gx_clip_path *clip_path;
  81.     gx_clip_stack_t *clip_stack;  /* (LanguageLevel 3 only) */
  82.     gx_clip_path *view_clip;    /* (may be 0, or have rule = 0) */
  83.     bool clamp_coordinates;    /* if true, clamp out-of-range */
  84.                 /* coordinates; if false, */
  85.                 /* report a limitcheck */
  86.     /* Effective clip path cache */
  87.     gs_id effective_clip_id;    /* (key) clip path id */
  88.     gs_id effective_view_clip_id;    /* (key) view clip path id */
  89.     gx_clip_path *effective_clip_path;    /* (value) effective clip path, */
  90.                 /* possibly = clip_path or view_clip */
  91.     bool effective_clip_shared;    /* true iff e.c.p. = c.p. or v.c. */
  92.  
  93.     /* Color (device-independent): */
  94.  
  95.     gs_color_space_index    /* before substitution */
  96.         orig_cspace_index, orig_base_cspace_index;
  97.     gs_color_space *color_space; /* after substitution */
  98.     gx_device_color_spaces_t device_color_spaces; /* substituted spaces */
  99.     gs_client_color *ccolor;
  100.  
  101.     /* Color caches: */
  102.  
  103.     gx_device_color *dev_color;
  104.  
  105.     /* Font: */
  106.  
  107.     gs_font *font;
  108.     gs_font *root_font;
  109.     gs_matrix_fixed char_tm;    /* font matrix * ctm */
  110. #define char_tm_only(pgs) *(gs_matrix *)&(pgs)->char_tm
  111.     bool char_tm_valid;        /* true if char_tm is valid */
  112.     gs_in_cache_device_t in_cachedevice;    /* (see gscpm.h) */
  113.     gs_char_path_mode in_charpath;    /* (see gscpm.h) */
  114.     gs_state *show_gstate;    /* gstate when show was invoked */
  115.                 /* (so charpath can append to path) */
  116.  
  117.     /* Other stuff: */
  118.  
  119.     int level;            /* incremented by 1 per gsave */
  120.     gx_device *device;
  121. #undef gs_currentdevice_inline
  122. #define gs_currentdevice_inline(pgs) ((pgs)->device)
  123.     gs_transparency_group_t *transparency_group_stack; /* (PDF 1.4 only) */
  124.  
  125.     /* Client data: */
  126.  
  127.     /*void *client_data;*/    /* in imager state */
  128. #define gs_state_client_data(pgs) ((pgs)->client_data)
  129.     gs_state_client_procs client_procs;
  130. };
  131.  
  132. #define public_st_gs_state()    /* in gsstate.c */\
  133.   gs_public_st_composite(st_gs_state, gs_state, "gs_state",\
  134.     gs_state_enum_ptrs, gs_state_reloc_ptrs)
  135.  
  136. #endif /* gzstate_INCLUDED */
  137.